<?php
/**
 * @package     Joomla.Site
 * @subpackage  Templates.beez3
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

JHtml::_('behavior.caption');
//define template dir
$app = JFactory::getApplication();
$templateDir = JURI::base() . 'templates/' . $app->getTemplate();

$new_zea_land_tours = CathomeInfo(10);
$australian_tours = CathomeInfo(11);
$new_zea_land_tours_youtube = getYouTubeIdFromURL($new_zea_land_tours->youtube);
$australian_tours_youtube = getYouTubeIdFromURL($australian_tours->youtube);


//newzealand tour list 
$new_zea_land_tours_list = get_article_from_cat(10);
$australian_tours_list = get_article_from_cat(11);
$feature_tour_list = get_feature_article();

?>

<div class="blue_line"></div>

<div class="fresh_container">
	<div class="fresh">
    <div class="fresh_title"><img src="<?php echo $templateDir; ?>/images/spj_fresh_title_05.png" width="245" height="32" alt="Fresh Journeys" /></div>
    
    <div class="tour_container">
        
    	<?php 
        foreach($feature_tour_list as $obj){
        ?>
    	<div class="tour_box">
            <div class="tour_photo"><a href="<?php echo JRoute::_('index.php?option=com_tours&view=tourdetails&id='.$obj->id.'&Itemid=136');?>"><img src="<?php echo get_first_image($obj->introtext);?>" width="293" height="182" border="0" /></a></div>
        <div class="tour_name"><a href="#"><?php echo $obj->title;?></a></div>
    	</div>
        <?php }?>              
        <br class="clear" />
    </div>
    </div>
</div>



<div class="nz_container">
	<div class="nz">
    <div class="nz_title"><img src="<?php echo $templateDir; ?>/images/spj_nz_title_16.png" width="384" height="40" alt="New Zealand Tours" /></div>
    
    <div class="nz_left"><object width="610" height="360"><param name="movie" value="//www.youtube-nocookie.com/v/<?php echo $new_zea_land_tours_youtube;?>?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube-nocookie.com/v/<?php echo $new_zea_land_tours_youtube?>?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="610" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
    
    <div class="nz_right">
    	<div class="nz_subtitle"><?php echo $new_zea_land_tours->hometitle;?></div>
        <?php echo $new_zea_land_tours->homedes;?>
    </div>
    <br class="clear" />
    
    <div class="tour_container">
        <?php 
        foreach($new_zea_land_tours_list as $obj){
        ?>
    	<div class="tour_box">
    	<div class="tour_photo"><a href="<?php echo JRoute::_('index.php?option=com_tours&view=tourdetails&id='.$obj->id.'&Itemid=136');?>"><img src="<?php echo get_first_image($obj->introtext);?>" width="293" height="182" border="0" /></a></div>
        <div class="tour_name"><a href="<?php echo JRoute::_('index.php?option=com_tours&view=tourdetails&id='.$obj->id.'&Itemid=136');?>"><?php echo $obj->title;?></a></div>
    	</div>
        <?php }?>                
        <br class="clear" />
    </div>
    </div>
</div>

<div class="au_container">
	<div class="au">
    <div class="au_title"><img src="<?php echo $templateDir; ?>/images/spj_au_title_20.png" width="328" height="36" alt="New Zealand Tours" /></div>
    
    <div class="au_left"><object width="610" height="360"><param name="movie" value="//www.youtube-nocookie.com/v/<?php echo $australian_tours_youtube;?>?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube-nocookie.com/v/<?php echo $australian_tours_youtube;?>?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="610" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
    
    <div class="au_right">
    	<div class="au_subtitle"><?php echo $australian_tours->hometitle;?></div>
       <?php echo $australian_tours->homedes;?>
    </div>
    <br class="clear" />
    
    <div class="tour_container">
    	 <?php 
        foreach($australian_tours_list as $obj){
        ?>
    	<div class="tour_box">
    	<div class="tour_photo"><a href="<?php echo JRoute::_('index.php?option=com_tours&view=tourdetails&id='.$obj->id.'&Itemid=136');?>"><img src="<?php echo get_first_image($obj->introtext);?>" width="293" height="182" border="0" /></a></div>
        <div class="tour_name"><a href="<?php echo JRoute::_('index.php?option=com_tours&view=tourdetails&id='.$obj->id.'&Itemid=136');?>"><?php echo $obj->title;?></a></div>
    	</div>
        <?php }?>                
        
        <br class="clear" />
    </div>
    </div>
</div>



